package com.chrudgames.stayintouch;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.view.MenuItem;

public class Prefs extends PreferenceActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this);
		pref.getBoolean("pref_notify", true);
		pref.getString("pref_duration", "60");

		addPreferencesFromResource(R.layout.prefs);

	}
	
	@Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle item selection
        switch (item.getItemId()) {

            case R.id.upgrade:
            	Intent i3 = new Intent(this, Upgrade.class);
               	startActivity(i3);
                return true;
            case R.id.help:
            	Intent i2 = new Intent(this, Help.class);
               	startActivity(i2);
                return true;
            default:
                return super.onOptionsItemSelected(item);
        }
    }
    
}